import { createRouter, createWebHistory } from "vue-router"

import ProsFarther from "../views/01_props/prosFarther.vue"
import CustomEvent from "../views/02_custom-event/farther.vue"
import MittView from '../views/03_mitt/Father.vue'
import VModelView from "../views/04_v-model/Father.vue"
import AttrsFather from "../views/05_attrs/Father.vue"
import RefParentView from '../views/06_refs&parent/Father.vue'
import ProvideInjectView from '../views/07_provide-inject/Father.vue'
import PiniaView from '../views/08_pinia/index.vue'
import SlotView from '../views/09_slot_默认插槽/Father.vue'
import SlotNamedView from '../views/09_slot_具名插槽/Father.vue'
 
const router = createRouter({
        history: createWebHistory(),
        routes: [
                {
                        path: '/props',
                        component: ProsFarther
                },
                {
                        path: '/event',
                        component: CustomEvent
                },
                {
                        path:'/mitt',
                        component:MittView
                },
                {
                        path:'/v-model',
                        component: VModelView
                },
                {
                        path:'/attrs',
                        component:AttrsFather
                },
                {
                        path:'/refParent',
                        component:RefParentView

                },
                {
                        path:'/provide-inject',
                        component:ProvideInjectView
                },
                {
                        path:'/pinia',
                        component:PiniaView
                },
                {
                        path:'/slot',
                        component:SlotNamedView
                },
                {
                        path:'/',
                        redirect:'/props'
                }
        ]
})

export default router